package com.yuyou.fn.tms.vo.resource;

import com.yuyou.fn.crm.entity.CustomerResource;
import io.swagger.annotations.ApiModelProperty;

import java.util.Date;
import java.util.HashMap;

/**
 * Created by lzh on 2019/4/18.
 */
public class ResourceCustomer {

    static HashMap<Integer,Integer> priorityMap=new HashMap<>();
    static {
        priorityMap.put(0,3);
        priorityMap.put(1,2);
        priorityMap.put(2,1);
    }

    @ApiModelProperty("导入记录ID")
    private Long importLogId ;//导入记录ID

    @ApiModelProperty("学生名字")
    private String studentName ;//学生名字

    @ApiModelProperty("学生ID")
    private Long studentId ;//学生ID

    @ApiModelProperty("0 正常(默认值) 1 已失效（已删除）")
    private Integer state ;//0 正常(默认值) 1 已失效（已删除）

    @ApiModelProperty("项目/活动名称")
    private String trsaName ;//项目/活动名称

    @ApiModelProperty("项目/活动时间")
    private Date trsaTime ;//项目/活动时间

    @ApiModelProperty("紧急程度（1-高2-中3-低）")
    private Integer stuUrgency ;//紧急程度（1-高2-中3-低）

    @ApiModelProperty("该次导入是否已咨询(0不是1是)")
    private String stuIsConsult ;//该次导入是否已咨询(0不是1是)

    @ApiModelProperty("导入时学生是否新生 (0不是1是)")
    private String stuIsNew ;//导入时学生是否新生 (0不是1是)

    @ApiModelProperty("导入部门ID")
    private Long importDeptId ;//导入部门ID

    @ApiModelProperty("导入人姓名")
    private String createUserName ;//导入人姓名

    @ApiModelProperty("导入人ID")
    private Long createUserId ;//导入人ID

    @ApiModelProperty("创建时间")
    private Date createTime ;//创建时间

    @ApiModelProperty("更新时间")
    private Date modifyTime ;//更新时间

    public ResourceCustomer(CustomerResource customerResource){
        this.setImportLogId(customerResource.getCustomerResourceId());//导入记录ID
        this.setStudentName(customerResource.getStudentName());//学生名字
        this.setStudentId(customerResource.getStudentId());//学生ID
        this.setState(0);//0 正常(默认值) 1 已失效（已删除）
        this.setTrsaName(customerResource.getProjectName());//项目/活动名称
        this.setTrsaTime(customerResource.getProjectTime());//项目/活动时间
        this.setStuUrgency(priorityMap.get(customerResource.getPriority()));//紧急程度（1-高2-中3-低）
        this.setStuIsConsult(null);//该次导入是否已咨询(0不是1是)
        this.setStuIsNew(null);//导入时学生是否新生 (0不是1是)
        //tag
        this.setImportDeptId(null);//导入部门ID
        this.setCreateUserName(customerResource.getImportOperatorName());//导入人姓名
        this.setCreateUserId(customerResource.getImportOperatorId());//导入人ID
        this.setCreateTime(customerResource.getCreateTime());//创建时间
        this.setModifyTime(customerResource.getUpdateTime());//更新时间
    }

    public Long getImportLogId() {
        return importLogId;
    }

    public void setImportLogId(Long importLogId) {
        this.importLogId = importLogId;
    }

    public String getStudentName() {
        return studentName;
    }

    public void setStudentName(String studentName) {
        this.studentName = studentName;
    }

    public Long getStudentId() {
        return studentId;
    }

    public void setStudentId(Long studentId) {
        this.studentId = studentId;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public String getTrsaName() {
        return trsaName;
    }

    public void setTrsaName(String trsaName) {
        this.trsaName = trsaName;
    }

    public Date getTrsaTime() {
        return trsaTime;
    }

    public void setTrsaTime(Date trsaTime) {
        this.trsaTime = trsaTime;
    }

    public Integer getStuUrgency() {
        return stuUrgency;
    }

    public void setStuUrgency(Integer stuUrgency) {
        this.stuUrgency = stuUrgency;
    }

    public String getStuIsConsult() {
        return stuIsConsult;
    }

    public void setStuIsConsult(String stuIsConsult) {
        this.stuIsConsult = stuIsConsult;
    }

    public String getStuIsNew() {
        return stuIsNew;
    }

    public void setStuIsNew(String stuIsNew) {
        this.stuIsNew = stuIsNew;
    }

    public Long getImportDeptId() {
        return importDeptId;
    }

    public void setImportDeptId(Long importDeptId) {
        this.importDeptId = importDeptId;
    }

    public String getCreateUserName() {
        return createUserName;
    }

    public void setCreateUserName(String createUserName) {
        this.createUserName = createUserName;
    }

    public Long getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(Long createUserId) {
        this.createUserId = createUserId;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getModifyTime() {
        return modifyTime;
    }

    public void setModifyTime(Date modifyTime) {
        this.modifyTime = modifyTime;
    }
}
